#ifndef GAME_ANIMATION_HY
#define GAME_ANIMATION_HY


#include "bitmap.h"
class CEngine;
class CDisplay;

#define FRAME_TIME 1

class CAnimation
{
private:
	CEngine *m_engine;
	int m_frameWidth;
	int m_frameHeight;
	int m_frameNum;
	int m_curFrame;
	int m_frameTime;
	CBmp m_frameImg;
	int m_idleTick;//Update 08'12.12 the idle state time tick!

public:
	CAnimation(CEngine *engine);
	~CAnimation();
	void LoadAnim(char *filename, int width, int height, int num);
	void DrawAnimation(int posX, int posY, bool loop);
	void DrawIdle(int posX, int posY/*, bool loop*/);//Update 08'12.12 Draw the actor idle state!
	bool IsAnimEnd();
	void ResetAnim();
};

#endif